﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NB.MGJ.Common.Utility
{
    [Serializable]
    public class LogOnUserModel
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserID { set; get; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }
        /// <summary>
        /// 登录名
        /// </summary>
        public string LoginName { set; get; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Modile { get; set; }

        /// <summary>
        /// 当前用户登录关联的角色  不包括服务版本
        /// </summary>
        public string FromTypeRole { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        //  public int Province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        //    public int City { get; set; }
        /// <summary>
        /// 机构ID
        /// </summary>
        public int EnterpriseId { get; set; }
        /// <summary>
        /// 总部机构ID    1 总部  
        /// </summary>
        public int HeadId { get; set; }
        /// <summary>
        /// 机构名称
        /// </summary>
        public string EnterpriseName { get; set; }

        /// <summary>
        ///获取下级机构ID 逗号分开   
        /// </summary>
        public string JuniorEnterprise { get; set; }
        /// <summary>
        /// 用户头像
        /// </summary>
        public string UserImg { get; set; }
        /// <summary>
        /// 经销商
        /// </summary>
        public int Distributor { get; set; }

        public string RoleID { get; set; }
        public List<UserMenuItem> menus { get; set; }

        /// <summary>
        /// 默认管理员用户ID  0企业自定义用户 
        /// </summary>
        public int AdminRoleID { get; set; }

        public List<string> actionControllers { get; set; }

        public string EImg { get; set; }
        //public string orgaid { get; set; }

        //public string organame { get; set; }
        //public string grade { get; set; }
        //public string subject { get; set; }
        //public string subjects { get; set; }

        /// <summary>
        /// 不要删了 重点对象：段扬
        /// </summary>
        public string Sign { get; set; }

        /// <summary>
        /// 机构code  Dy
        /// </summary>
        public string ECode { get; set; }

        /// <summary>
        /// 机构LOGO
        /// </summary>
        public string OrganizationLogo
        {
            get;
            set;
        }
        /// <summary>
        /// 用户类型 1 企业 2普通用户
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// OpenId
        /// </summary>
        public string   WXOpenId { get; set; }
    }

    [Serializable]
    public class UserMenuItem
    {
        public int menuno { get; set; }
        public string menuname { get; set; }
        public string actionname { get; set; }
        public string controller { get; set; }
        public string groupname { get; set; }
        public string groupicon { get; set; }
        public string icon { get; set; }
        public DateTime createtime { get; set; }
        public int isadd { get; set; }
        public int isdel { get; set; }
        public int isupd { get; set; }
        public bool isgroup { get; set; }
        public List<UserMenuItem> menus { get; set; }
    }
}
